extends /templates/common/table

block tableResultsHeader
  tr
    th(colspan=4)
      span(data-i18n="general.results")
        | Results
      span
        |: #{documents.length}

block tableHeader
  tr
    th(data-i18n="general.name")
    th(data-i18n="editor.product")
    th(data-i18n="teacher.section")
    th(data-i18n="polls.priority")

block tableBody
  for resource in documents
    tr
      td(title=resource.get('name')).name-row
        a(href=`/editor/${page}/${resource.get('slug') || resource.id}`)= resource.get('name')
      td(title=resource.get('product')).product-row= resource.get('product')
      td(title=resource.get('section')).section-row= resource.get('section')
      td(title=resource.get('priority')).priority-row= resource.get('priority')
    if resource.get('link')
      tr.link-row
        td(colspan=4 title=resource.get('link')).link-row
          a(href=resource.get('link') target="_blank")= resource.get('link')
    if resource.get('description')
      tr.description-row
        td(colspan=4 title=resource.get('description')).description-row= resource.get('description')
